/*
 * @Descripttion: 调用接口公共方法
 * @version: 1.0.0
 * @Author: zhanganwu
 * @Date: 2020-03-02 14:26:28
 * @LastEditors: zhanganwu
 * @LastEditTime: 2020-03-02 14:26:28
 */


// 1. 信用卡详情查询 => dbank/credit/v1/creditCardAccountQuery.do
// 2. 根据卡号查询卡账单信息 => dbank/credit/v1/queryCreditCard.do
// 3. 还款接口 => dbank/credit/v1/returnCreditCard.do

const API = {
    // 信用卡详情查询
    creditCardAccountQuery: 'dbank.creditCardAccountQuery',
    // 根据卡号查询卡账单信息
    queryCreditCard: 'dbank.queryCreditCard',
    // 还款接口
    returnCreditCard: 'dbank.returnCreditCard'

};

//  ===============================================================

/**
 * 信用卡详情查询
 * @param {Object} params 上送参数
 * @returns {Promise}
 */
export const creditCardAccountQuery = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.creditCardAccountQuery, params, 3, '', token, options);
};

/**
 * 根据卡号查询卡账单信息
 * @param {Object} params 上送参数
 * @returns {Promise}
 */
export const queryCreditCard = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.queryCreditCard, params, 3, '', token, options);
};

/**
 * 还款接口
 * @param {Object} params 上送参数
 * @returns {Promise}
 */
export const returnCreditCard = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.returnCreditCard, params, 3, '', token, options);
};

